<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, minimum-scale=1.0, initial-scale=1.0, user-scalable=no">
    <title>日新网 - 商讯详情</title>
    <link rel="stylesheet" href="__TMPL__Public/assets/css/bootstrap.min.css">
    <link rel="stylesheet" href="__TMPL__Public/assets/css/reset.css">
    <link rel="stylesheet" href="__TMPL__Public/assets/css/style.css">
    <script type="text/javascript" src="__TMPL__Public/assets/js/rem.js"></script>
    <style>
        .newsFlash_info {
            margin: .2rem .16rem 0;
            padding: .24rem .26rem .34rem;
            background-color: #fff;
        }
        .newsFlash_info h3 {
            font-size: 16px;
            line-height: .42rem;
            margin-bottom: .16rem;
            font-weight: bolder;
        }
        .newsFlash_info .name ,.newsFlash_info .timer {
            font-size:12px ;
            line-height: .26rem;
        }
        .newsFlash_info .name {
            color: #000232;
            margin-right: .34rem;
        }
        .newsFlash_info .timer {
            color: #a9a9a9;
        }
        .newsFlash_info .text {
            padding: 0 .08rem;
            font-size: 14px;
            line-height: .38rem;
            margin-top: .16rem;
            color: #333333;
        }
        /*声明*/
        .statement{
            padding: .16rem .26rem .24rem;
            background-color: #FFFFFF;
            margin: .12rem .16rem 0;
            color:#a9a9a9;
            font-size: 13px;
            line-height: 17px;
        }
        /*二维码*/
        .or_code {
            padding: .22rem .24rem .28rem;
            margin: .12rem .16rem;
            background-color: #fff;
        }
        .or_code img {
            width: 1.6rem;
            height: 1.6rem;
            float: left;
        }
        .or_code .text {
            margin-left: 1.78rem;
        }

    </style>
</head>
<body>
<!--nav-->
<tc_include file="Public:nav"/>
<div class="newsFlash_info">
    <h3>{$info.post_title}</h3>
    <p>
        <span class="timer">{:time_format($info['post_date'])}</span>
    </p>
    <p class="text">{$info.post_excerpt}</p>
</div>
<!--二维码-->
<div class="or_code clearfix">
    <img src="/public/images/active/person1.png" alt="">
    <p class="text">
        了解详情扫描二维码添加好友小新
    </p>
</div>
<!--页脚-->
<tc_include file="Public:footer"/>

<script type="text/javascript" src="__TMPL__Public/assets/js/jquery.1.12.4.js"></script>
<script src="__TMPL__Public/assets/js/bootstrap.min.js" ></script>
<script src="__TMPL__Public/assets/js/jquery.infiniteScroll.js"></script>

<!--微信分享-->
<script src="__PUBLIC__/js/wx/jweixin-1.4.0.js"></script>
<script type="text/javascript">
    wx.config({
        debug: false,
        appId: '{$signPackage.appId}',
        timestamp: '{$signPackage.timestamp}',
        nonceStr: '{$signPackage.nonceStr}',
        signature: '{$signPackage.signature}',
        jsApiList: [
            // 所有要调用的 API 都要加到这个列表中
            'checkJsApi',
            'onMenuShareAppMessage',
            'onMenuShareTimeline'
        ]
    });

    //完成wx.config，执行这里
    wx.ready(function () {

        wx.checkJsApi({
            jsApiList: ['onMenuShareAppMessage', 'onMenuShareTimeline'], // 需要检测的JS接口列表，所有JS接口列表见附录2,
        });

        <?php
            $op			= array("\r\n","\n","\r",' ');
            $excerpt 	= str_replace($op, '', $info["post_excerpt"]);
        ?>

        var data = {
            title: "{$info['post_title']}",
            desc: '{$excerpt}',
            link: window.location.href,
            imgUrl: "{$share_pic_path}",
        }

        //分享给朋友
        wx.onMenuShareAppMessage(data);
        //分享到朋友圈
        wx.onMenuShareTimeline(data);
    });
</script>
</body>
</html>